package com.vehicle.auto.click.service.impl;

import com.vehicle.auto.click.mapper.primary.PhotoInfoMapper;
import com.vehicle.auto.click.mapper.primary.VehicleInfoMapper;
import com.vehicle.auto.click.mapper.second.CheckInfoMapper;
import com.vehicle.auto.click.mapper.second.VehilceCheckMapper;
import com.vehicle.auto.click.service.VehicleInfoService;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("vehicleInfoService")
public class VehicleInfoServiceImpl implements VehicleInfoService {
    @Autowired
    VehicleInfoMapper vehicleInfoMapper;
    @Autowired
    VehilceCheckMapper vehilceCheckMapper;
    @Autowired
    PhotoInfoMapper photoInfoMapper;
    @Autowired
    CheckInfoMapper checkInfoMapper;

    public List queryVehicleInfos(Map map) {
        List list = this.vehicleInfoMapper.queryVehicleInfos(map);
        return list;
    }

    public Integer updateVehicleInfos(Map map) {
        return this.vehicleInfoMapper.updateVehicleInfos(map);
    }

    public String selectShuoming(String id) {
        return StringUtils.isNotBlank(id) ? this.photoInfoMapper.selectShuoming(id) : "";
    }

    public Integer queryVehicleInfoCount(Map map) {
        return this.vehicleInfoMapper.queryCount(map);
    }

    public List queryVehicleChecks(Map map) {
        List list = this.vehilceCheckMapper.queryVehicleInfos(map);
        return list;
    }

    public Integer updateVehicleChecks(Map map) {
        return this.vehilceCheckMapper.updateVehicleInfos(map);
    }

    public String selectResult(String id) {
        return StringUtils.isNotBlank(id) ? this.checkInfoMapper.selectShuoming(Integer.parseInt(id)) : "";
    }

    public Integer quertVehicleCheckCount(Map map) {
        return this.vehilceCheckMapper.queryCount(map);
    }
}
